﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Hugo.UIOptions
{
    class TileUIPageShift : UIOption
    {
        TileUIPage tilePage;
        bool shiftLeft;

        public TileUIPageShift(TileUIPage tilePage, bool shiftLeft)
            : base(shiftLeft ? "Left" : "Right", shiftLeft ? Util.loadBitmap(Properties.Resources.icon_left) : Util.loadBitmap(Properties.Resources.icon_right))
        {
            this.tilePage = tilePage;
            this.shiftLeft = shiftLeft;
        }

        public override void wasSelected()
        {
            if (shiftLeft)
            {
                tilePage.shiftLeft();
            }
            else
            {
                tilePage.shiftRight();
            }
        }

    }
}
